﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ThreadModule.Data;

namespace ThreadModule.Interface
{
    /// <summary>
    /// 锥螺纹量规接口
    /// </summary>
    public interface ITaperThread
    {
        /// <summary>
        /// 旋转数据点集
        /// </summary>
        /// <param name="listRawdata">原始数据点集</param>
        /// <param name="rotatedAngle">旋转角度</param>
        /// <returns>旋转后的数据点集</returns>
        List<RawDataPoint> RotateDataPoints(List<RawDataPoint> listRawdata, double rotatedAngle);
        
        /// <summary>
        /// 计算锥度值
        /// </summary>
        /// <param name="threadInformation">螺纹信息</param>
        /// <returns>锥度值</returns>
        double GetTaper(ref ThreadInformation threadInformation);

        /// <summary>
        /// 查找角平分线
        /// </summary>
        /// <param name="k1">斜率k1</param>
        /// <param name="b1">截距b1</param>
        /// <param name="k2">斜率k2</param>
        /// <param name="b2">截距b2</param>
        /// <returns>角平分线参数值，item1为b，item2为k</returns>
        Tuple<double,double> FindAngleBisector(double k1, double b1, double k2, double b2);
    }
}
